'use strict';
module.exports = app => {
  const { STRING, INTEGER } = app.Sequelize;
  const Calendar = app.model.define(
    'Calendar',
    {
      id: { type: INTEGER, primaryKey: true, autoIncrement: true },
        name: STRING(32),
        content: STRING(255),
    },
    {
      tableName: 'calendar',
      timestamps: true, // 启用时间戳(createdAt, updatedAt)
      updatedAt: false, // 不想要 updatedAt
      createdAt: 'created_at', // 想要  createdAt 但是希望名称叫做 created_at
    }
  );
  return Calendar;
};
